<%@ page pageEncoding="UTF-8"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.base.DatabaseObject"%>
<%@page import="com.base.Config"%>
<%@page import="java.math.BigDecimal"%>
<%@page import="com.utils.LOBs"%>
<%@page import="java.sql.Clob"%>
<%
	String sCatId = Utils.getParam(request, "catid", "0");
	String sPage = Utils.getParam(request, "page", "1");
 %>
<%@include file="inc-header.jsp"%>
    <div class="main">
    	<div class="item mag0">
		<%@include file="inc-menu.jsp"%>
		<div class="portlet" id="yw0">
		<div class="portlet-content">
		    <div class="bg_user">
		        <ul class="list_style">
		            <li class="user-name clearfix">
		                <p class="fl">Hi:  
		                </p>
		            </li>
		        </ul>
		    </div>
		</div>
		</div> 
        </div>
        <div class="bg_gray">
            <ul class="list_style clearfix">
                <li class="fl ">
                    <a class="block" title="" href="ser-gameonline.jsp">
                        Game Online
                    </a>
                </li>
                <li class="fl active">
                    <a class="block" title="" href="ser-gameoff.jsp">
                        Game Offline
                    </a>
                </li>
            </ul>
        </div>
        <div class="sub_list">
            <ul class="list_style clearfix">
                <li class="fl active"><a class="block" title="" href="">Mới</a></li>
                <li class="fl "><a class="block" title="" href="">Hot</a></li>
            </ul>
        </div>
	<div class="item">
    <div class="list-game">
    <ul class="list_style">
    <li>
        <%
        int currPage = Integer.parseInt(sPage);
		int rowsPerPage = 3;
		ArrayList<DatabaseObject> contentList = contentDAO.getContentListByTypeGameOff(new BigDecimal(sCatId), currPage, rowsPerPage);
		if (contentList == null || contentList.isEmpty()) {
				contentList = contentDAO.getContentListByTypeGameOff(new BigDecimal("1065"), 1, 3);
		}
		if (contentList != null && !contentList.isEmpty()) {%>
		<table cellpadding="0" cellspacing="0" width="100%" border="0">
		<%
			for (DatabaseObject content : contentList) {%>
            <tr>
            <td width="85">
			<a title="" class="data_link" href="#"><img class="img-80-80" src="<%=imagePath + content.getAttribute().get("avatar_image") %>"></a>
            </td>
			<td class="info-data" valign="top">
			<a class="data_link" title=""
			href=""><%=content.getAttribute().get("name") %></a>
            <p><strong><span class="cl999">Chia sẻ:</span>50%</strong></p>
            <p><a title="" href="" class="ic-money clf60"><strong>Kinh doanh ngay</strong></a></p>
            </td>
			<%}%>
		</table>
		<%}%>
	</li>
	</div>
	</div>
<div class="portlet" id="yw1">
<p class="mag0 link-top">
    <a title="" href="#">Lên đầu trang</a>
</p>
<%@include file="inc-footter.jsp"%>